package com.pxmeta.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pxmeta.user.entity.UserVisit;
import com.pxmeta.user.entity.vo.UserVisitVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  用户访问 Mapper 接口
 * </p>
 *
 * @author hh
 * @since 2022-07-19
 */
public interface UserVisitMapper extends BaseMapper<UserVisit> {
    List<UserVisitVO> selectSawMe(@Param("userId") Long userId,
                                  @Param("page") Integer page,
                                  @Param("size") Integer size);

    List<UserVisitVO> selectSawWho(@Param("userId") Long userId,
                                   @Param("page") Integer page,
                                   @Param("size") Integer size);

    Integer selectTodaySawCount(@Param("userId")Long userId);


    /**
     * 谁看过我数量
     * @param userId
     * @return
     */
    Integer selectSawMeCount(@Param("userId")Long userId);
}
